package com.ztgf.sys.service;

import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.BeanUtils;
import javax.annotation.Resource;
import com.ztgf.sys.common.config.YmlConfig;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.ztgf.sys.mapper.SysWebsiteSeoMapper;
import com.ztgf.sys.models.service.ISysWebsiteSeoService;
import com.ztgf.sys.models.bo.SysWebsiteSeoSaveBO;
import com.ztgf.sys.models.dto.SysWebsiteSeoDTO;

/**
 * 网站SEO控制器
 *
 * @author YUE
 * @Date 2020-07-09 11:22:10
 */
@DubboService
public class SysWebsiteSeoServiceImpl extends ServiceImpl<SysWebsiteSeoMapper, SysWebsiteSeoDTO> implements ISysWebsiteSeoService{

    @Resource
    private YmlConfig ymlConfig;

    @Override
    public boolean add(SysWebsiteSeoSaveBO saveBO) {
        SysWebsiteSeoDTO dto = new SysWebsiteSeoDTO();
        BeanUtils.copyProperties(saveBO,dto);
        Long id = ymlConfig.getPkId();
        dto.setId(id);
        return this.insert(dto);
    }
}
